import 'package:flutter/material.dart';

class HeaderItemTitle extends StatelessWidget {
  final String title;
  final Icon? icon;
  final VoidCallback? onTap;
  const HeaderItemTitle(
      {super.key, required this.title, this.icon, this.onTap});

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
        padding: const EdgeInsets.symmetric(horizontal: 16),
        height: 50,
        child: Row(
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            icon ?? Container(),
            Text(
              title,
              style: const TextStyle(
                  color: Colors.white,
                  fontSize: 15,
                  fontWeight: FontWeight.w500),
            ),
            const Spacer(),
            const Text(
              "More",
              style: TextStyle(color: Colors.white70, fontSize: 13),
            ),
            const Icon(
              Icons.chevron_right,
              color: Colors.white70,
            )
          ],
        ),
      ),
    );
  }
}
